package cn.myspringboot.article.service;

import cn.myspringboot.user.domain.Article;
import cn.myspringboot.user.domain.Bar;
import cn.myspringboot.user.domain.TypeNameCount;
import cn.myspringboot.user.domain.YearAndMonth;
import cn.myspringboot.user.query.ArticleQuery;
import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface ArticleService {
    void addArticle(Article article);
    void updateArticle(Article article);
    void deleteArticle(Long id);
    Article getArticleById(Long id);
    List<Article> getArticleAll();
    PageInfo<Article> getArticleByPage(ArticleQuery articleQuery);
    void batchdelArticle(List<Long> ids);
    PageInfo<Article> getPage(ArticleQuery articleQuery);
    Integer star(HttpServletRequest request,Long id);

    Integer read(HttpServletRequest request, Long id);
    List<TypeNameCount> findByTypeName();

    Map<Integer,List<Article>> getArticleYear();

    List<YearAndMonth> findByYearAndMonth();
    List<Bar> fingStarsAndNameByArticle();
}
